package com.sys.plat.db;

import org.hibernate.Hibernate;
import org.hibernate.dialect.MySQLDialect;

import java.sql.Types;

/**
 * Created by IntelliJ IDEA.
 * User: mabo
 * Date: 11-3-11
 * Time: 下午8:59
 * To change this template use File | Settings | File Templates.
 */
public class MySqlDialectEx extends MySQLDialect {
    public MySqlDialectEx() {
        super();
        registerHibernateType(Types.DATE, "datetime");
        registerHibernateType(Types.LONGVARBINARY, Hibernate.TEXT.getName());
        registerHibernateType(-1, Hibernate.STRING.getName());
        registerHibernateType(Types.DECIMAL, Hibernate.BIG_DECIMAL.getName());
    }
}
